import 'package:flutter/material.dart';

class MyApp8 extends StatelessWidget {
  const MyApp8({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'column组件的使用',
          style: TextStyle(fontSize: 18, color: Colors.white),
        ),
        backgroundColor: Colors.orange,
        centerTitle: true,
      ),
      body: Center(
        child: Container(
          width: 300,
          height: 400,
          color: const Color.fromARGB(255, 145, 210, 245),
          child: Column(
            //设置主轴方向对齐
            mainAxisAlignment: MainAxisAlignment.center,
            //设置侧轴方向对齐
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Image.network(
                'https://yanxuan-item.nosdn.127.net/72e734dd1a4d35ce650afebdaa600b57.png',
                width: 200,
              ),
              const SizedBox(height: 10), //使用sizedBox控件设置间距
              const Text('美妆效果嘎嘎不卡粉末面刷'),
              //使用padding组件设置间距
              const Padding(
                padding: EdgeInsets.only(top: 10),
                child: Text('¥99.90'),
              )
            ],
          ),
        ),
      ),
    );
  }
}
